package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserWxApp;
import com.appkubes.mall.core.po.MallUserWxAppExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserWxAppMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserWxAppSqlProvider.class, method="countByExample")
    long countByExample(MallUserWxAppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserWxAppSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserWxAppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_wx_app",
        "where wx_app_openid = #{wxAppOpenid,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String wxAppOpenid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_wx_app (wx_app_openid, app_key, ",
        "bind_user_key, avatar_url, ",
        "tel, address, nick_name, ",
        "birthday, gender, ",
        "email, create_time, ",
        "update_time, login_time, ",
        "access_token, union_id, ",
        "client_type, version)",
        "values (#{wxAppOpenid,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{bindUserKey,jdbcType=VARCHAR}, #{avatarUrl,jdbcType=VARCHAR}, ",
        "#{tel,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, ",
        "#{birthday,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, ",
        "#{email,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{loginTime,jdbcType=INTEGER}, ",
        "#{accessToken,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR}, ",
        "#{clientType,jdbcType=TINYINT}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallUserWxApp record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserWxAppSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserWxApp record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserWxAppSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="wx_app_openid", property="wxAppOpenid", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bind_user_key", property="bindUserKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="avatar_url", property="avatarUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="nick_name", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="birthday", property="birthday", jdbcType=JdbcType.VARCHAR),
        @Result(column="gender", property="gender", jdbcType=JdbcType.INTEGER),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="login_time", property="loginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="access_token", property="accessToken", jdbcType=JdbcType.VARCHAR),
        @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_type", property="clientType", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserWxApp> selectByExampleWithRowbounds(MallUserWxAppExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserWxAppSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="wx_app_openid", property="wxAppOpenid", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bind_user_key", property="bindUserKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="avatar_url", property="avatarUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="nick_name", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="birthday", property="birthday", jdbcType=JdbcType.VARCHAR),
        @Result(column="gender", property="gender", jdbcType=JdbcType.INTEGER),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="login_time", property="loginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="access_token", property="accessToken", jdbcType=JdbcType.VARCHAR),
        @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_type", property="clientType", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserWxApp> selectByExample(MallUserWxAppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "wx_app_openid, app_key, bind_user_key, avatar_url, tel, address, nick_name, ",
        "birthday, gender, email, create_time, update_time, login_time, access_token, ",
        "union_id, client_type, version",
        "from mall_user_wx_app",
        "where wx_app_openid = #{wxAppOpenid,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="wx_app_openid", property="wxAppOpenid", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bind_user_key", property="bindUserKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="avatar_url", property="avatarUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="nick_name", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="birthday", property="birthday", jdbcType=JdbcType.VARCHAR),
        @Result(column="gender", property="gender", jdbcType=JdbcType.INTEGER),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="login_time", property="loginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="access_token", property="accessToken", jdbcType=JdbcType.VARCHAR),
        @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_type", property="clientType", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallUserWxApp selectByPrimaryKey(String wxAppOpenid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserWxAppSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserWxApp record, @Param("example") MallUserWxAppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserWxAppSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserWxApp record, @Param("example") MallUserWxAppExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserWxAppSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserWxApp record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_wx_app
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_wx_app",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "bind_user_key = #{bindUserKey,jdbcType=VARCHAR},",
          "avatar_url = #{avatarUrl,jdbcType=VARCHAR},",
          "tel = #{tel,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "nick_name = #{nickName,jdbcType=VARCHAR},",
          "birthday = #{birthday,jdbcType=VARCHAR},",
          "gender = #{gender,jdbcType=INTEGER},",
          "email = #{email,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "login_time = #{loginTime,jdbcType=INTEGER},",
          "access_token = #{accessToken,jdbcType=VARCHAR},",
          "union_id = #{unionId,jdbcType=VARCHAR},",
          "client_type = #{clientType,jdbcType=TINYINT},",
          "version = #{version,jdbcType=INTEGER}",
        "where wx_app_openid = #{wxAppOpenid,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserWxApp record);
}